<template>
  <div class="form-item">
    <div class="item-label">{{ label }}</div>
    <div class="item-body">
      <slot></slot>
    </div>
  </div>
</template>

<script lang="ts" setup>
withDefaults(
  defineProps<{
    label: string
  }>(),
  {}
)
</script>

<style lang="scss" scoped>
.form-item {
  display: flex;
  align-items: center;
  margin: 15px 0;
  .item-label {
    width: 100px;
  }
}
</style>
